{extend name="base"}
{block name="title"}
点赚金-后台管理-提现管理
{/block}
{block name="pageName"}
已审核提现请求列表
{/block}
{block name="pageBody"}
<!-- 一个表格 -->
<div class="btn-toolbar">
    <button class="btn btn-success" onclick="javascript:location.reload()">刷新</button>
  <div class="btn-group">
  </div>
</div>
<div class="well">
    <table class="table">
      <thead>
        <tr>
			<th>#</th>
			<th>用户名</th>
			<th>提现金额</th>
			<th>审核人</th>
			<th>申请时间</th>
			<th>审核时间</th>
          	<th style="width: 26px;"></th>
        </tr>
      </thead>
      <tbody id="cashs">
        {volist name='cashs' id='cash'}
		<tr id="{$cash.cash_id}">
			<th scope="row">{$i}</th>
			<td onclick="getInfo('{$cash.user_id}')">
				<a href="#" style="color: blue">{$cash.user_name}</a>
			</td>
			<td>{$cash.cash_num}</td>
			<td>{$cash.admin_name}</td>
			<td>{$cash.gmt_create}</td>
			<td>{$cash.gmt_pass}</td>
		</tr>
		{/volist}
      </tbody>
    </table>
</div>
<div class="pagination">
    {$cashs->render()}
</div>

<!-- 进行状态修改的jQuery函数 -->
	<script>
		function getInfo(user_id){
			$.getJSON("{:url('userdo/getUser')}",{user_id:user_id},function(data){
				var user = data.data;
				$("#user_info input[name='user_name']").val(user.user_name);
				$("#user_info input[name='user_balance']").val(user.user_balance);
				$("#user_info input[name='user_phone']").val(user.user_phone);
				$("#user_info input[name='user_email']").val(user.user_email);
				$("#user_info").modal("show");
			})
		}
	</script>
{/block}
<!-- 一个表格结束 -->
{block name="model"}
	<div id="user_info" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h3 id="myModalLabel">用户信息</h3>
		</div>
		<form class="form-horizontal" action="{:url('douserupdate')}" method="post" enctype="multipart/form-data">
			<br>
			<input type="hidden" name="uid"><br>
			<div class="control-group">
	            <label class="control-label">用户名</label>
	            <div class="controls">
	              <input type="text" name="user_name" required><br>
	        	</div>
	        </div>
	        <div class="control-group">
	            <label class="control-label">余额</label>
	            <div class="controls">
	              <input type="email" name="user_balance" required><br>
	        	</div>
	        </div>
			<div class="control-group">
	            <label class="control-label">联系方式</label>
	            <div class="controls">
	              <input type="text" name="user_phone" required><br>
	        	</div>
	        </div>
			<div class="control-group">
	            <label class="control-label">邮箱</label>
	            <div class="controls">
	              <input type="email" name="user_email" required><br>
	        	</div>
	        </div>
			<div class="modal-footer">
				<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
			</div>
		</form>
	</div>
{/block}